package com.nxk.modules.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Data
@TableName("sys_role")
public class SysRole extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @Length(max = 64,message = "角色编码不能大于64位")
    @NotEmpty(message = "角色编码不能为空")
    @TableField(condition = SqlCondition.LIKE)
    private String roleCode;

    @Length(max = 64,message = "角色名称不能大于64位")
    @NotEmpty(message = "角色名称不能为空")
    @TableField(condition = SqlCondition.LIKE)
    private String roleName;

    @Length(max = 1,message = "系统角色不能大于1位")
    @NotEmpty(message = "系统角色不能为空")
    private String isSystem;  //是否系统角色(1.是2.否)

    @Length(max = 1,message = "角色类型不能大于1位")
    @NotEmpty(message = "角色类型不能为空")  //角色分类（1.普通角色 2.普通管理员 3.超级管理员）
    private String roleType;







}
